package com.example.entity;

import org.springframework.context.annotation.Lazy;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * @Title: spring-boot-druid
 * @Package com.example.entity
 * @Date 2018/5/9下午1:45
 * @Author PX ye
 * @E-mail yepx2013@gmail.com
 * @Company http://www.yiautos.com
 * @Description: 城市联级
 */
@Table
@Entity
public class ChinaArea implements Serializable {

    private static final long serialVersionUID = 3204454923216051601L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private Integer version;
    private Date gmt_create;
    private Date gmt_modified;
    private Integer code;
    private String name;
    private Long parent_id;
    private String pin_yin;
    private String simple_pin_yin;

    @Transient
    private List<ChinaArea> childrenList;
    ChinaArea() {
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Date getGmt_create() {
        return gmt_create;
    }

    public void setGmt_create(Date gmt_create) {
        this.gmt_create = gmt_create;
    }

    public Date getGmt_modified() {
        return gmt_modified;
    }

    public void setGmt_modified(Date gmt_modified) {
        this.gmt_modified = gmt_modified;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getParent_id() {
        return parent_id;
    }

    public void setParent_id(Long parent_id) {
        this.parent_id = parent_id;
    }

    public String getPin_yin() {
        return pin_yin;
    }

    public void setPin_yin(String pin_yin) {
        this.pin_yin = pin_yin;
    }

    public String getSimple_pin_yin() {
        return simple_pin_yin;
    }

    public void setSimple_pin_yin(String simple_pin_yin) {
        this.simple_pin_yin = simple_pin_yin;
    }

    public List<ChinaArea> getChildrenList() {
        return childrenList;
    }

    public void setChildrenList(List<ChinaArea> childrenList) {
        this.childrenList = childrenList;
    }
}
